<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>table模块快速使用</title>
    <link rel="stylesheet" href="/static/css/layui.css"  media="all">
</head>
<body>

<table id="demo" lay-filter="test"></table>

<script src="/static/js/layui.js" charset="utf-8"></script>
<script>
    layui.use('table', function(){

        var table = layui.table;

        table.render({
            elem: '#demo'
            ,url:'/back/content/ad/list/'
            ,cellMinWidth: 80
            ,cols: [[
                 {field: 'id', title: '编号', width:80, sort: true, fixed: 'left'}
                ,{field: 'adTitle', title: '广告标题', width:200}
                ,{field: 'adContent', title: '广告内容', width: 400, sort: true, totalRow: true}
                ,{field: 'adPictureUrl', title: '广告链接', width:80, sort: true}
                ,{field: 'createTime', title: '发布时间', width: 80, sort: true, totalRow: true}
                ,{fixed: 'right', width: 165, align:'center', toolbar: '#barDemo'}
            ]]

        });

    });
</script>
</body>
</html>

</body>
</html>

